function topnavevent(object,obj2){
	if(object==obj2){
		$("#"+object).animate({"margin-right":"0px","margin-left":"-181px"},0);
		return;
	}
	$("#"+object).mouseenter(function(){
		$("#"+object).animate({"margin-right":"0px","margin-left":"-181px"},400);
	}).mouseleave(function(){
		$("#"+object).stop().animate({"margin-left":"0px"},400);
	});
}

var rollautochange;
function rollchangecell(index){
	clearInterval(rollautochange);
	rollautochangecell(index);
	rollautochange=setInterval("rollautochangecell('right')",5000);
}
var rollchangeindex=1;
function rollautochangecell(index){
	$("#rollchange"+rollchangeindex).removeClass('rollchangecellin').addClass('rollchangecellout');
	var x=0;
	if(index=="left"){
		if(rollchangeindex<=1){
			rollchangeindex=5;
		}else{
			rollchangeindex=parseInt(rollchangeindex)-1;
		}
		x=1;
	}else if(index=="right"){
		if(rollchangeindex>=5){
			rollchangeindex=1;
		}else{
			rollchangeindex=parseInt(rollchangeindex)+1;
		}
		x=-1;
	}else{ 
		x=rollchangeindex-index;
		rollchangeindex=index;
	}
	var le=-762*(parseInt(rollchangeindex)-1);
	$("#rollchangepanel").animate({"margin-left":le+"px"},500);
	$("#rollchange"+rollchangeindex).removeClass('rollchangecellout').addClass('rollchangecellin');
}

function menu2mouseenter(id){
	$("#"+id).stop().animate({'margin-left':'-0px'},300);
	$("#"+id+"t").css('color','#fff');
}
function menu2mouseout(id){
	$("#"+id).stop().animate({'margin-left':'-236px'},300);
	$("#"+id+"t").css('color','#dfdfdf');
}